package com.flyqiu.flow.core.tools;

import com.flyqiu.flow.api.context.ProcInstContext;
import com.flyqiu.flow.bpmn.element.UserTask;

import com.flyqiu.flow.event.ProcInstDefaultEventContext;
import com.flyqiu.flow.event.ProcInstEventContext;
import com.flyqiu.flow.event.UserTaskDefaultEventContext;
import com.flyqiu.flow.event.UserTaskEventContext;
import com.flyqiu.flow.model.entity.ProcDeployDef;
import com.flyqiu.flow.model.entity.base.ProcInst;
import com.flyqiu.flow.model.entity.base.Task;

public class EventTools {
    public static ProcInstEventContext createContext(ProcInstContext procContext, ProcInst procInst) {
        return new ProcInstDefaultEventContext(procContext.getProcBusiness(), procContext.getProcDeployDef(), procInst);
    }

    public static UserTaskEventContext createContext(ProcDeployDef procDeployDef, ProcInst procInst, UserTask currentElement, Task task) {
        return new UserTaskDefaultEventContext(procDeployDef, procInst, currentElement, task);
    }
}
